<template>
  <div class="inventory-game">
    <!-- 游戏头部 -->
    <div class="game-header">
      <div class="header-content">
        <el-button icon="ArrowLeft" @click="goBack">返回游戏中心</el-button>
        <div class="game-title">
          <h1>📦 库存管理模拟</h1>
          <p>合理管理库存，降低成本，提高周转率</p>
        </div>
        <div class="game-stats">
          <el-tag type="success" size="large">第 {{ currentDay }} 天</el-tag>
          <el-tag type="warning" size="large">资金: ¥{{ formatMoney(money) }}</el-tag>
          <el-tag type="danger" size="large">得分: {{ score }}</el-tag>
        </div>
      </div>
    </div>

    <!-- 游戏主体 -->
    <div class="game-container">
      <!-- 开始界面 -->
      <div v-if="gameStatus === 'ready'" class="game-start">
        <div class="start-card">
          <el-icon class="start-icon"><Box /></el-icon>
          <h2>库存管理模拟</h2>
          <p>你是一家零售店的库存经理，需要合理控制库存，在30天内获得最高利润</p>
          <div class="game-rules">
            <h3>游戏规则</h3>
            <ul>
              <li>初始资金：100,000元</li>
              <li>模拟30天的经营，每天需要做出采购和定价决策</li>
              <li>要考虑：需求波动、库存成本、缺货损失、过期商品</li>
              <li>库存积压会产生仓储费用，缺货会损失销售机会</li>
              <li>某些商品有保质期，过期会造成损失</li>
              <li>根据最终资金和周转率计算得分</li>
            </ul>
          </div>
          <el-button type="primary" size="large" @click="startGame">
            <el-icon><CaretRight /></el-icon>
            开始经营
          </el-button>
        </div>
      </div>

      <!-- 游戏进行中 -->
      <div v-if="gameStatus === 'playing'" class="game-playing">
        <!-- 左侧：库存状态 -->
        <div class="left-panel">
          <el-card class="inventory-status">
            <template #header>
              <h3>📊 库存状态</h3>
            </template>
            <el-table :data="inventory" max-height="400" border>
              <el-table-column prop="name" label="商品" width="120" />
              <el-table-column prop="stock" label="库存" width="80" align="right">
                <template #default="{ row }">
                  <el-tag :type="getStockStatus(row).type" size="small">
                    {{ row.stock }}
                  </el-tag>
                </template>
              </el-table-column>
              <el-table-column prop="cost" label="成本" width="80" align="right">
                <template #default="{ row }">
                  ¥{{ row.cost }}
                </template>
              </el-table-column>
              <el-table-column prop="price" label="售价" width="80" align="right">
                <template #default="{ row }">
                  ¥{{ row.price }}
                </template>
              </el-table-column>
              <el-table-column prop="daysLeft" label="天数" width="80" align="center" v-if="row.perishable">
                <template #default="{ row }">
                  <el-tag v-if="row.perishable" :type="row.daysLeft <= 3 ? 'danger' : 'warning'" size="small">
                    {{ row.daysLeft }}天
                  </el-tag>
                  <span v-else>-</span>
                </template>
              </el-table-column>
            </el-table>
          </el-card>

          <el-card class="daily-report">
            <template #header>
              <h3>📈 今日报告</h3>
            </template>
            <div class="report-item">
              <span class="label">销售收入：</span>
              <span class="value positive">+¥{{ formatMoney(todayReport.revenue) }}</span>
            </div>
            <div class="report-item">
              <span class="label">采购成本：</span>
              <span class="value negative">-¥{{ formatMoney(todayReport.purchaseCost) }}</span>
            </div>
            <div class="report-item">
              <span class="label">仓储费用：</span>
              <span class="value negative">-¥{{ formatMoney(todayReport.storageCost) }}</span>
            </div>
            <div class="report-item">
              <span class="label">缺货损失：</span>
              <span class="value negative">-¥{{ formatMoney(todayReport.stockoutLoss) }}</span>
            </div>
            <div class="report-item">
              <span class="label">过期损失：</span>
              <span class="value negative">-¥{{ formatMoney(todayReport.expiredLoss) }}</span>
            </div>
            <div class="report-item total">
              <span class="label">今日利润：</span>
              <span class="value" :class="todayReport.profit >= 0 ? 'positive' : 'negative'">
                {{ todayReport.profit >= 0 ? '+' : '' }}¥{{ formatMoney(Math.abs(todayReport.profit)) }}
              </span>
            </div>
          </el-card>
        </div>

        <!-- 右侧：决策面板 -->
        <div class="right-panel">
          <el-card class="decision-panel">
            <template #header>
              <h3>🎯 今日决策（第 {{ currentDay }} 天）</h3>
            </template>
            
            <el-alert
              title="今日市场预测"
              :description="marketForecast"
              type="info"
              :closable="false"
              show-icon
              class="forecast-alert"
            />

            <el-divider content-position="left">采购决策</el-divider>
            <div class="purchase-section">
              <div v-for="item in inventory" :key="item.id" class="purchase-item">
                <div class="item-info">
                  <h4>{{ item.name }}</h4>
                  <p>成本: ¥{{ item.cost }} | 当前库存: {{ item.stock }}</p>
                  <p v-if="item.perishable" class="perishable-warning">
                    <el-icon><Warning /></el-icon>
                    保质期商品（{{ item.shelfLife }}天）
                  </p>
                </div>
                <el-input-number
                  v-model="decisions.purchase[item.id]"
                  :min="0"
                  :max="Math.floor(money / item.cost)"
                  :step="10"
                  size="large"
                  class="purchase-input"
                />
              </div>
            </div>

            <el-divider content-position="left">定价策略</el-divider>
            <div class="pricing-section">
              <div v-for="item in inventory" :key="item.id" class="pricing-item">
                <div class="item-info">
                  <h4>{{ item.name }}</h4>
                  <p>建议售价: ¥{{ item.suggestedPrice }}</p>
                </div>
                <el-slider
                  v-model="decisions.pricing[item.id]"
                  :min="item.cost"
                  :max="item.cost * 3"
                  :step="1"
                  :format-tooltip="(val) => `¥${val}`"
                  class="price-slider"
                />
              </div>
            </div>

            <div class="action-buttons">
              <el-button type="primary" size="large" @click="submitDecision" :loading="processing">
                确认决策并进入下一天
              </el-button>
              <el-button size="large" @click="showHelp">
                <el-icon><QuestionFilled /></el-icon>
                决策建议
              </el-button>
            </div>
          </el-card>
        </div>
      </div>

      <!-- 游戏结束 -->
      <div v-if="gameStatus === 'finished'" class="game-finish">
        <div class="finish-card">
          <el-icon class="finish-icon" :class="performance.grade">
            <Trophy v-if="performance.grade === 'S' || performance.grade === 'A'" />
            <Medal v-else />
          </el-icon>
          <h2>经营完成！</h2>
          <div class="performance-grade" :class="performance.grade">
            {{ performance.grade }} 级
          </div>
          <p class="performance-text">{{ performance.text }}</p>
          
          <div class="final-stats">
            <div class="stat-item">
              <div class="stat-label">最终资金</div>
              <div class="stat-value">¥{{ formatMoney(money) }}</div>
            </div>
            <div class="stat-item">
              <div class="stat-label">总利润</div>
              <div class="stat-value" :class="totalProfit >= 0 ? 'positive' : 'negative'">
                {{ totalProfit >= 0 ? '+' : '' }}¥{{ formatMoney(Math.abs(totalProfit)) }}
              </div>
            </div>
            <div class="stat-item">
              <div class="stat-label">库存周转率</div>
              <div class="stat-value">{{ turnoverRate.toFixed(2) }}</div>
            </div>
            <div class="stat-item">
              <div class="stat-label">缺货次数</div>
              <div class="stat-value">{{ stockoutCount }}</div>
            </div>
            <div class="stat-item">
              <div class="stat-label">过期损失</div>
              <div class="stat-value negative">¥{{ formatMoney(totalExpiredLoss) }}</div>
            </div>
            <div class="stat-item">
              <div class="stat-label">最终得分</div>
              <div class="stat-value highlight">{{ score }}</div>
            </div>
          </div>

          <div class="action-buttons">
            <el-button type="primary" size="large" @click="restartGame">
              再玩一次
            </el-button>
            <el-button size="large" @click="goBack">
              返回游戏中心
            </el-button>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref, reactive, computed } from 'vue'
import { useRouter } from 'vue-router'
import { ElMessage, ElMessageBox } from 'element-plus'
import {
  ArrowLeft, Box, CaretRight, Trophy, Medal, Warning, QuestionFilled
} from '@element-plus/icons-vue'

const router = useRouter()

// 游戏状态
const gameStatus = ref('ready')
const currentDay = ref(1)
const money = ref(100000)
const score = ref(0)
const processing = ref(false)

// 库存数据
const inventory = ref([
  { id: 1, name: '饮料', stock: 50, cost: 3, price: 5, suggestedPrice: 5, perishable: true, shelfLife: 30, daysLeft: 30, demand: 50 },
  { id: 2, name: '零食', stock: 30, cost: 5, price: 8, suggestedPrice: 8, perishable: true, shelfLife: 60, daysLeft: 60, demand: 30 },
  { id: 3, name: '日用品', stock: 20, cost: 10, price: 15, suggestedPrice: 15, perishable: false, demand: 20 },
  { id: 4, name: '电子产品', stock: 5, cost: 100, price: 150, suggestedPrice: 150, perishable: false, demand: 5 }
])

// 决策数据
const decisions = reactive({
  purchase: { 1: 0, 2: 0, 3: 0, 4: 0 },
  pricing: { 1: 5, 2: 8, 3: 15, 4: 150 }
})

// 今日报告
const todayReport = reactive({
  revenue: 0,
  purchaseCost: 0,
  storageCost: 0,
  stockoutLoss: 0,
  expiredLoss: 0,
  profit: 0
})

// 统计数据
const stockoutCount = ref(0)
const totalExpiredLoss = ref(0)
const totalRevenue = ref(0)
const totalCost = ref(0)

// 市场预测
const marketForecast = ref('今日天气晴朗，预计客流量正常')

// 市场预测列表
const forecasts = [
  '今日天气晴朗，预计客流量正常',
  '周末来临，预计客流量增加20%',
  '雨天，预计客流量减少30%',
  '节假日，饮料和零食需求大增',
  '促销日，预计各类商品需求增加',
  '工作日，客流量平稳',
  '高温天气，饮料需求增加50%',
  '电商促销日，实体店客流减少'
]

// 总利润
const totalProfit = computed(() => money.value - 100000)

// 库存周转率
const turnoverRate = computed(() => {
  if (totalCost.value === 0) return 0
  return totalRevenue.value / (totalCost.value / 30)
})

// 绩效评级
const performance = computed(() => {
  const profit = totalProfit.value
  if (profit >= 50000) {
    return { grade: 'S', text: '卓越！您是库存管理大师，利润和周转率都非常出色！' }
  } else if (profit >= 30000) {
    return { grade: 'A', text: '优秀！您的库存管理能力很强，取得了不错的利润！' }
  } else if (profit >= 10000) {
    return { grade: 'B', text: '良好！您基本掌握了库存管理，但还有提升空间！' }
  } else if (profit >= 0) {
    return { grade: 'C', text: '及格！虽然有盈利，但需要优化库存策略！' }
  } else {
    return { grade: 'D', text: '需要改进！建议学习库存管理的最佳实践！' }
  }
})

// 格式化金额
const formatMoney = (amount) => {
  return Math.floor(amount).toLocaleString()
}

// 获取库存状态
const getStockStatus = (item) => {
  if (item.stock === 0) return { type: 'danger', text: '缺货' }
  if (item.stock < item.demand * 0.5) return { type: 'warning', text: '偏低' }
  if (item.stock > item.demand * 3) return { type: 'info', text: '积压' }
  return { type: 'success', text: '正常' }
}

// 开始游戏
const startGame = () => {
  gameStatus.value = 'playing'
  // 初始化决策
  inventory.value.forEach(item => {
    decisions.pricing[item.id] = item.price
  })
  updateMarketForecast()
  ElMessage.success('开始经营！祝您赚大钱！')
}

// 更新市场预测
const updateMarketForecast = () => {
  marketForecast.value = forecasts[Math.floor(Math.random() * forecasts.length)]
}

// 提交决策
const submitDecision = async () => {
  processing.value = true
  
  // 重置今日报告
  Object.assign(todayReport, {
    revenue: 0,
    purchaseCost: 0,
    storageCost: 0,
    stockoutLoss: 0,
    expiredLoss: 0,
    profit: 0
  })

  // 1. 处理采购
  inventory.value.forEach(item => {
    const purchaseQty = decisions.purchase[item.id] || 0
    if (purchaseQty > 0) {
      const cost = purchaseQty * item.cost
      if (cost <= money.value) {
        item.stock += purchaseQty
        money.value -= cost
        todayReport.purchaseCost += cost
        totalCost.value += cost
      }
    }
  })

  // 2. 更新价格
  inventory.value.forEach(item => {
    item.price = decisions.pricing[item.id]
  })

  // 3. 模拟销售
  inventory.value.forEach(item => {
    // 计算需求（受价格影响）
    const priceRatio = item.suggestedPrice / item.price
    let demandMultiplier = 1 + (priceRatio - 1) * 0.5 // 价格影响需求
    
    // 随机波动
    demandMultiplier *= (0.8 + Math.random() * 0.4)
    
    const actualDemand = Math.floor(item.demand * demandMultiplier)
    const soldQty = Math.min(actualDemand, item.stock)
    
    // 销售收入
    const revenue = soldQty * item.price
    todayReport.revenue += revenue
    totalRevenue.value += revenue
    money.value += revenue
    
    // 更新库存
    item.stock -= soldQty
    
    // 缺货损失
    if (soldQty < actualDemand) {
      const lostSales = (actualDemand - soldQty) * item.price * 0.5 // 缺货导致50%损失
      todayReport.stockoutLoss += lostSales
      stockoutCount.value++
    }
  })

  // 4. 处理保质期
  inventory.value.forEach(item => {
    if (item.perishable) {
      item.daysLeft--
      
      if (item.daysLeft <= 0) {
        // 过期商品损失
        const expiredValue = item.stock * item.cost
        todayReport.expiredLoss += expiredValue
        totalExpiredLoss.value += expiredValue
        item.stock = 0
        item.daysLeft = item.shelfLife
      }
    }
  })

  // 5. 仓储费用（库存占用成本）
  inventory.value.forEach(item => {
    const storageCost = item.stock * item.cost * 0.001 // 0.1%的日仓储费
    todayReport.storageCost += storageCost
    money.value -= storageCost
  })

  // 6. 计算今日利润
  todayReport.profit = todayReport.revenue - todayReport.purchaseCost - todayReport.storageCost - todayReport.stockoutLoss - todayReport.expiredLoss

  // 7. 重置采购决策
  Object.keys(decisions.purchase).forEach(key => {
    decisions.purchase[key] = 0
  })

  processing.value = false

  // 延迟显示结果
  await new Promise(resolve => setTimeout(resolve, 500))

  if (todayReport.profit > 1000) {
    ElMessage.success(`今日大赚！利润: ¥${formatMoney(todayReport.profit)}`)
  } else if (todayReport.profit > 0) {
    ElMessage.info(`今日小赚！利润: ¥${formatMoney(todayReport.profit)}`)
  } else {
    ElMessage.warning(`今日亏损！损失: ¥${formatMoney(Math.abs(todayReport.profit))}`)
  }

  // 检查是否破产
  if (money.value < 1000) {
    ElMessage.error('资金不足，经营困难！')
  }

  // 进入下一天
  currentDay.value++
  
  if (currentDay.value > 30) {
    finishGame()
  } else {
    updateMarketForecast()
  }
}

// 显示帮助
const showHelp = () => {
  ElMessageBox.alert(`
    <h3>决策建议</h3>
    <ul style="text-align: left; line-height: 1.8;">
      <li>📈 根据市场预测调整采购量</li>
      <li>💰 避免过度采购导致库存积压</li>
      <li>⏰ 注意易腐商品的保质期</li>
      <li>🎯 合理定价：过高影响销量，过低损失利润</li>
      <li>📊 保持合理的安全库存，避免缺货</li>
      <li>🔄 提高库存周转率，减少资金占用</li>
    </ul>
  `, '库存管理技巧', {
    confirmButtonText: '知道了',
    dangerouslyUseHTMLString: true
  })
}

// 完成游戏
const finishGame = () => {
  // 计算最终得分
  const profitScore = Math.max(0, totalProfit.value / 100)
  const turnoverScore = turnoverRate.value * 100
  const penaltyScore = stockoutCount.value * 10 + totalExpiredLoss.value / 100
  
  score.value = Math.floor(profitScore + turnoverScore - penaltyScore)
  
  gameStatus.value = 'finished'
  ElMessage.success('30天经营完成！')
}

// 重新开始
const restartGame = () => {
  gameStatus.value = 'ready'
  currentDay.value = 1
  money.value = 100000
  score.value = 0
  stockoutCount.value = 0
  totalExpiredLoss.value = 0
  totalRevenue.value = 0
  totalCost.value = 0
  
  // 重置库存
  inventory.value = [
    { id: 1, name: '饮料', stock: 50, cost: 3, price: 5, suggestedPrice: 5, perishable: true, shelfLife: 30, daysLeft: 30, demand: 50 },
    { id: 2, name: '零食', stock: 30, cost: 5, price: 8, suggestedPrice: 8, perishable: true, shelfLife: 60, daysLeft: 60, demand: 30 },
    { id: 3, name: '日用品', stock: 20, cost: 10, price: 15, suggestedPrice: 15, perishable: false, demand: 20 },
    { id: 4, name: '电子产品', stock: 5, cost: 100, price: 150, suggestedPrice: 150, perishable: false, demand: 5 }
  ]
  
  Object.assign(todayReport, {
    revenue: 0,
    purchaseCost: 0,
    storageCost: 0,
    stockoutLoss: 0,
    expiredLoss: 0,
    profit: 0
  })
}

// 返回游戏中心
const goBack = () => {
  router.push('/learning/games')
}
</script>

<style scoped>
.inventory-game {
  min-height: 100vh;
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.game-header {
  background: white;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.game-title {
  flex: 1;
  text-align: center;
}

.game-title h1 {
  margin: 0 0 5px 0;
  font-size: 24px;
  color: #303133;
}

.game-title p {
  margin: 0;
  color: #909399;
  font-size: 14px;
}

.game-stats {
  display: flex;
  gap: 10px;
}

.game-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* 开始界面 */
.game-start {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 600px;
}

.start-card {
  background: white;
  border-radius: 16px;
  padding: 50px;
  text-align: center;
  max-width: 600px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.start-icon {
  font-size: 80px;
  color: #67c23a;
  margin-bottom: 20px;
}

.start-card h2 {
  margin: 0 0 15px 0;
  font-size: 32px;
  color: #303133;
}

.start-card > p {
  margin: 0 0 30px 0;
  color: #606266;
  font-size: 16px;
  line-height: 1.6;
}

.game-rules {
  text-align: left;
  background: #f5f7fa;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.game-rules h3 {
  margin: 0 0 15px 0;
  color: #303133;
  font-size: 18px;
}

.game-rules ul {
  margin: 0;
  padding-left: 20px;
  color: #606266;
}

.game-rules li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* 游戏进行中 */
.game-playing {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 20px;
}

.left-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.inventory-status h3,
.daily-report h3,
.decision-panel h3 {
  margin: 0;
  font-size: 16px;
}

.daily-report {
  background: white;
}

.report-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #ebeef5;
}

.report-item.total {
  border-bottom: none;
  padding-top: 15px;
  margin-top: 5px;
  border-top: 2px solid #dcdfe6;
  font-size: 16px;
  font-weight: bold;
}

.report-item .label {
  color: #606266;
}

.report-item .value {
  font-weight: bold;
}

.report-item .value.positive {
  color: #67c23a;
}

.report-item .value.negative {
  color: #f56c6c;
}

.right-panel {
  min-height: 600px;
}

.decision-panel {
  background: white;
}

.forecast-alert {
  margin-bottom: 20px;
}

.purchase-section,
.pricing-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.purchase-item,
.pricing-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #f5f7fa;
  border-radius: 8px;
  gap: 20px;
}

.item-info {
  flex: 1;
}

.item-info h4 {
  margin: 0 0 5px 0;
  color: #303133;
  font-size: 16px;
}

.item-info p {
  margin: 0;
  color: #909399;
  font-size: 13px;
}

.perishable-warning {
  color: #e6a23c !important;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px !important;
}

.purchase-input {
  width: 150px;
}

.price-slider {
  width: 250px;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
}

/* 游戏结束 */
.game-finish {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 600px;
}

.finish-card {
  background: white;
  border-radius: 16px;
  padding: 50px;
  text-align: center;
  max-width: 800px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.finish-icon {
  font-size: 80px;
  margin-bottom: 20px;
}

.finish-icon.S,
.finish-icon.A {
  color: #f59e0b;
}

.finish-icon.B {
  color: #3b82f6;
}

.finish-icon.C,
.finish-icon.D {
  color: #6b7280;
}

.finish-card h2 {
  margin: 0 0 20px 0;
  font-size: 32px;
  color: #303133;
}

.performance-grade {
  display: inline-block;
  padding: 10px 30px;
  border-radius: 50px;
  font-size: 48px;
  font-weight: bold;
  margin-bottom: 15px;
}

.performance-grade.S {
  background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
  color: #8b4513;
}

.performance-grade.A {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: white;
}

.performance-grade.B {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: white;
}

.performance-grade.C {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  color: white;
}

.performance-grade.D {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
  color: white;
}

.performance-text {
  font-size: 16px;
  color: #606266;
  margin-bottom: 30px;
  line-height: 1.6;
}

.final-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-item {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 20px;
  color: white;
}

.stat-label {
  font-size: 14px;
  margin-bottom: 10px;
  opacity: 0.9;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
}

.stat-value.highlight {
  font-size: 32px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1200px) {
  .game-playing {
    grid-template-columns: 1fr;
  }
  
  .final-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }
  
  .game-stats {
    flex-direction: column;
  }
  
  .start-card, .finish-card {
    padding: 30px 20px;
  }
  
  .final-stats {
    grid-template-columns: 1fr;
  }
  
  .purchase-item,
  .pricing-item {
    flex-direction: column;
  }
  
  .price-slider {
    width: 100%;
  }
}
</style>

